package com.rk.recommand;

import java.util.HashMap;
import java.util.Map;

public class UserCFDriver {

    public static final String HDFS = "hdfs://192.168.45.101:9000";

    public static void main(String[] args) {

        Map<String, String> path = new HashMap<String, String>();
        //path.put("data", "/home/yj/HadoopFile/userFile/item.csv");// 本地的数据文件
        path.put("data", "D:\\hadoop_study_data\\UserCF\\data\\data.txt");
        path.put("input_file", HDFS + "/user/yj/input/userCF/");// HDFS的目录
       // path.put("input_file", "D:/hadoop_study_data/UserCF");
        path.put("input_step1",  path.get("input_file") + "/data");
        path.put("output_step1", path.get("input_file") + "/step1");
        path.put("input_step2",  path.get("output_step1"));
        path.put("output_step2", path.get("input_file") + "/step2");
        path.put("input_step3",  path.get("output_step2"));
        path.put("output_step3", path.get("input_file") + "/step3");
        path.put("input1_step4", path.get("output_step3"));
        path.put("input2_step4", path.get("input_step1"));
        path.put("output_step4", path.get("input_file") + "/step4");
        path.put("input_step5",  path.get("output_step4"));
        path.put("output_step5", path.get("input_file") + "/step5");

        try
        {
            UserCF_Step1.run(path);
            UserCF_Step2.run(path);
            UserCF_Step3.run(path);
            UserCF_Step4.run(path);
            UserCF_Step5.run(path);
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }

        System.exit(0);

    }
}
